<template>
  <div class="moment-login">
    <div class="moment-login-guide">
      <van-button
        size="small"
        type="primary"
        icon="cross"
        round
        @click="backUp"
      />
      <van-button
        size="small"
        type="primary"
        style="padding: 2px 14px; border-radius: var(--border-radius)"
      >
        注册
      </van-button>
    </div>
    <div class="moment-login-tips">
      <h1 class="moment-login-tips-title">手机快捷登录</h1>
      <p class="moment-login-tips-subtitle">未注册过的手机号将自动创建账号</p>
    </div>

    <login-form></login-form>

    <div class="moment-login-other">
      <div class="moment-login-other-tips">
        <span>其他方式登录</span>
      </div>
      <div class="moment-login-other-icons">
        <div class="moment-login-other-icons-item">
          <i class="iconfont icon-QQ"></i>
        </div>
        <div class="moment-login-other-icons-item">
          <i class="iconfont icon-wechat-fill"></i>
        </div>
        <div class="moment-login-other-icons-item">
          <i class="iconfont icon-alipay"></i>
        </div>
      </div>
    </div>
  </div>
</template>

<script lang="ts" setup>
import LoginForm from "./components/login-form.vue";
import { useRouter } from "vue-router";
const router = useRouter();
const backUp = (): void => {
  router.go(-1);
};
</script>

<style lang="less" scoped>
.moment-login {
  padding: 40px 25px 35px 25px;
  height: 100vh;
  box-sizing: border-box;
  background-color: var(--background-color-std-1);
  &-guide {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  &-tips {
    &-title {
      margin-top: 50px;
      font-size: 22px;
      color: var(--font-color-2);
      font-weight: bold;
    }
    &-subtitle {
      margin-top: 15px;
      margin-bottom: 50px;
      font-size: 15px;
      color: var(--font-color-2);
    }
  }

  &-other {
    &-tips {
      color: var(--font-color-2);
      text-align: center;
      margin: 40px 0 25px 0;
      font-size: 14px;
    }

    &-tips span {
      position: relative;
    }

    &-tips span::before {
      content: "";
      position: absolute;
      width: 60px;
      height: 1px;
      background-color: var(--font-color-9);
      left: -68px;
      top: 50%;
      transform: translateY(-100%) scaleY(0.5);
    }

    &-tips span::after {
      content: "";
      position: absolute;
      width: 60px;
      height: 1px;
      background-color: var(--font-color-9);
      right: -68px;
      top: 50%;
      transform: translateY(-100%) scaleY(0.5);
    }
    &-icons {
      display: flex;
      justify-content: center;
      align-items: center;

      &-item {
        width: 32px;
        height: 32px;
        background-color: var(--background-color-5);
        border-radius: 50%;
        display: flex;
        justify-content: center;
        align-items: center;
      }

      &-item:nth-of-type(2) {
        margin: 0 32px;
      }

      .iconfont {
        font-size: 16px;
        color: #fff;
      }
    }
  }
}
</style>
